package command;

import model.Perspective;

public class TranslateYCommand implements ICommand {
	
	private Perspective perspective;
	private int value;
	
	public TranslateYCommand(Perspective perspective, int value) {
		this.perspective = perspective;
		this.value = value;
	}
	
	@Override
	public void execute() {
		updateyValue();
	}
	
	private void updateyValue() {
		perspective.updateyPosition(value);
	}

	@Override
	public void undo() {
		perspective.updateyPosition(-value);
	}
	
}